<template>
  <el-pagination
    @size-change="handleSizeChange"
    @current-change="handleCurrentChange"
    :current-page="pagination.page"
    :page-sizes="[10, 20, 50, 100, 200]"
    :page-size="pagination.pageSize"
    :background="true"
    layout="total, sizes, prev, pager, next, jumper"
    :total="pagination.total">
  </el-pagination>
</template>

<script>
export default {
  name: "MyPagination",

  props: {
    pagination:{
      type:Object,
      default:{
        page:1,
        pageSize:50,
        total:0
      }
    }
  },

  methods:{
    handleSizeChange(val) {
      this.$emit('changeSize',val)
    },
    handleCurrentChange(val) {
      this.$emit('changePage',val)
    }
  }
}
</script>

<style scoped>

</style>
